﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using LigerMVC.Entities.Mapping;

namespace LigerMVC.DataAccess
{
    public class Entities : DbContext
    {
        public Entities()
            : base("name=MVCEntities")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CF_CompanyMap());
            modelBuilder.Configurations.Add(new CF_DepartmentMap());
            modelBuilder.Configurations.Add(new CF_EmployeeMap());
            modelBuilder.Configurations.Add(new CF_PrivilegeMap());
            modelBuilder.Configurations.Add(new CF_UserMap());
            modelBuilder.Configurations.Add(new CF_UserRoleMap());
            modelBuilder.Configurations.Add(new PhoneAttributionMap());
            modelBuilder.Configurations.Add(new Sys_ButtonClassMap());
            modelBuilder.Configurations.Add(new Sys_ButtonMap());
            modelBuilder.Configurations.Add(new Sys_MenuControllerMap());
            modelBuilder.Configurations.Add(new Sys_MenuMap());
        }
    }
}
